package com.lhkj.ct.meta.modules.psychology.model.entity;

import com.lhkj.ct.meta.modules.gauge.common.enums.GaugeType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;
import java.time.LocalTime;

/**
 * <p>
 *
 * </p>
 *
 * @author jobob
 * @since 2023-10-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TblGaugeAnswer对象", description="")
public class TblGaugeAnswer implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "报告id")
    private String rId;

    @ApiModelProperty(value = "题目id")
    private String qutId;

    @ApiModelProperty(value = "选项id")
    private String optId;

    @ApiModelProperty(value = "作答结果")
    private String answer;

    @ApiModelProperty(value = "计时", example = "00:00:00")
    private LocalTime costTime;

    @ApiModelProperty(value = "测验类型", hidden = true)
    private GaugeType type;

    public static TblGaugeAnswer.TblGaugeAnswerBuilder builder() {
        return new TblGaugeAnswer.TblGaugeAnswerBuilder();
    }

    public static class TblGaugeAnswerBuilder {
        private TblGaugeAnswer tblGaugeAnswer;

        public TblGaugeAnswerBuilder() {
            tblGaugeAnswer = new TblGaugeAnswer();
        }

        public TblGaugeAnswerBuilder rId(String rId) {
            this.tblGaugeAnswer.rId = rId;
            return this;
        }

        public TblGaugeAnswerBuilder qutId(String qutId) {
            this.tblGaugeAnswer.qutId = qutId;
            return this;
        }

        public TblGaugeAnswerBuilder optId(String optId) {
            this.tblGaugeAnswer.optId = optId;
            return this;
        }

        public TblGaugeAnswerBuilder answer(String answer) {
            this.tblGaugeAnswer.answer = answer;
            return this;
        }

        public TblGaugeAnswerBuilder type(GaugeType type) {
            this.tblGaugeAnswer.type = type;
            return this;
        }


        public TblGaugeAnswerBuilder costTime(LocalTime costTime) {
            this.tblGaugeAnswer.costTime = costTime;
            return this;
        }


        public TblGaugeAnswer build() {
            return this.tblGaugeAnswer;
        }
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
